package cn.fintecher.pangolin.entity.mysql;

import cn.fintecher.pangolin.common.enums.ResourceType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Auther: xiaqun
 * @Description: 资源实体
 * @Date: 10:43 2019/8/13
 */

@Data
@Entity
@Table(name = "resource")
public class Resource implements Serializable {
    @Id
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @ApiModelProperty(value = "资源名称")
    private String name;

    @ApiModelProperty(value = "层级")
    private Integer level;

    @ApiModelProperty(value = "类型")
    @Enumerated(EnumType.STRING)
    private ResourceType type;

    @ApiModelProperty(value = "路由")
    private String url;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "父级资源ID")
    private Integer parent;

    @ApiModelProperty(value = "排序")
    private Integer sort;
}
